<template>
	<view class="Wedetail padding-bottom-xl">
		<view class="head">
			<view class="HeadText">
				<view class="cuIcon-back backIco" @click="naback"></view>
				<view class="nameTitle margin-top">开心果</view>
				<view class="margin-top">
					<view class="secContent flex align-center">
						<image src="../../static/errorImage.jpg" class="touxiang" mode=""></image>
						<view class="textcon margin-left-xs">开心果<text class="margin-lr-xs">|</text>lv3</view>
					</view>
				</view>
				<view class="cuIcon-forwardfill shareIco"></view>
			</view>
			<image src="../../static/index_back.png" class="bgimage" mode=""></image> 
		</view>
		<view class="flex justify-between align-center bg-white solid-bottom">
			<view  class="nav text-left bg-white">
				<view class="cu-item text-xm cur ">最新</view>
				<view class="cu-item">最热</view>
				<view class="cu-item">活动</view>
			</view>	
			<view class="text-lg cuIcon-rankfill margin-right" @click="navTo('/pages/we/detailsec')"></view>
		</view>
		<view class="activeBox">
			<view class="sec-header">
				<text class="cuIcon-communityfill text-xm margin-right-xs text-lg"></text>
				<text>我的动态</text>
			</view>
			<view class="margin-top">
				<view class="findBox" v-for="(item,index) in tableList" :key="index"> 
					<view class="headBox flex justify-between align-center">
						<view class="flex justify-start align-center">
							<image :src="item.avatar" class="imgHead" ></image>
							<view class="nameBox">
								<view class="name">{{item.nickname}}</view>
								<view class="sec">{{$ComFunJS.getNowDate('yyyy-MM-dd',item.updatetime)}}</view>
							</view>
						</view>
						<view class="boxItem">
						类型	
						</view>
					</view>
					<view v-if="item.imgs">
						<image :src="$ComFunJS.ImgFile(item.imgs.split(',')[0])" mode="widthFix" style="width: 100%;"></image>
					</view>
					<view class="ContetText bg-white">
						{{item.content}}
					</view>
					<view class="bottomBox flex justify-between align-center">
						<view class="flex justify-start align-center">
							<view class="cuIcon-comment ico"></view>
							<view class="text">评论</view> 
						</view>
						<view class="flex justify-start align-center">
							<view class="cuIcon-like ico"></view>
							<view class="text">3.5w</view> 
						</view>
						<view class="flex justify-start align-center">
							<view class="cuIcon-appreciate"></view>
							<view class="text">23</view> 
						</view>															
						<view class="flex justify-start align-center">
							<view class="cuIcon-share ico"></view>
							<view class="text">分享</view> 
						</view>
					</view>
				</view> 	
				<view class="findBox" v-if="false"> 
					<view class="headBox flex justify-between align-center">
						<view class="flex justify-start align-center">
							<image src="../../static/logo.png" class="imgHead" ></image>
							<view class="nameBox">
								<view class="name">asd</view>
								<view class="sec">asd</view>
							</view>
						</view>
						<view class="boxItem">
						啊大苏打	
						</view>
					</view>
					<view class="ContetText">
						啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打啊大苏打
					</view>
					<view class="bottomBox flex justify-between align-center">
						<view class="flex justify-start align-center">
							<view class="cuIcon-comment ico"></view>
							<view class="text">评论</view> 
						</view>
						<view class="flex justify-start align-center">
							<view class="cuIcon-like ico"></view>
							<view class="text">3.5w</view> 
						</view>
						<view class="flex justify-start align-center">
							<view class="cuIcon-appreciate"></view>
							<view class="text">23</view> 
						</view>															
						<view class="flex justify-start align-center">
							<view class="cuIcon-share ico"></view>
							<view class="text">分享</view> 
						</view>
					</view>
				</view>							
			</view>
		</view>
		<view class="pushBtn justify-center align-center bg-gradual-red flex" @click="navTo('/pages/find/push?id='+id)">发表</view>
		<view v-if="type==2" class="flex justify-center margin-top padding-bottom fixed bottom" style="width: 100%;position: fixed;bottom: 0;">
			<button class="add-btn">￥100<text class="margin-left-xs">加入小组</text></button>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				TabCur:1,
				type:1,
				id:"",
				tableList:[]
			};
		},
		onLoad(option){
			if(option.id){
				this.id = option.id
			}
		},
		onShow() {
			this.getList()
		},
		methods: {
			getList(){
				this.$ComFunJS.ajax({
					url:'/addons/cms/api/myht',
					method: 'get',
					data:{
						xid:this.id
					},
					success: (res) => {
						this.tableList = res;
					}
				})
			},			
			navTo(url){
				uni.navigateTo({
					url: url
				})
			},
			naback(){
				uni.navigateBack()
			}
		},

	}
</script>

<style lang="scss">
	page{
		background: #F5F5F5;
	}
	.Wedetail{
		.pushBtn{
			position: fixed;
			right: 40upx;
			bottom: 120upx;
			width:100upx;
			height: 100upx;
			border-radius: 50%;
			color: #FFFFFF;
			font-size: 26upx;
			box-shadow:0px 0px 10upx 0px rgba(0,0,0,0.2);
		}
		.activeBox{
			padding: 40upx;
		}
		.head{
			width: 100%;
			height: 400upx;
			position: relative;
			.HeadText{
				padding:40upx;
				padding-top:180upx;
				box-sizing: border-box;
				position: relative;
				width: 100%;
				height: 400upx;
				z-index: 33;
				color: #FFFFFF;
				.backIco{
					font-size: 36upx;
					color: #FFFFFF;
					position: absolute;
					left: 30upx;
					top: 20upx;
				}
				.shareIco{
					font-size: 36upx;
					color: #FFFFFF;
					position: absolute;
					right: 30upx;
					bottom: 40upx;
				}				
				.nameTitle{
					color: #FFFFFF;
					font-size: 36upx;
					font-weight: 500;
					font-family:PingFang;
				}
				.secContent{
					.touxiang{
						height: 80upx;
						width: 80upx;
					}
					.textcon{
						font-size: 26upx;
						color: #FFFFFF;
					}
				}
			}
			.bgimage{
				width: 100%;
				height: 400upx;
				position: absolute;
				left: 0;
				top: 0;
				z-index: 2;
			}
		}
	}
</style>
